const prompts = require('prompts');
const { replaceInit2 } = require('./commanderHandler/replace2/index.js');
const { findInit } = require('./commanderHandler/find/index.js');

async function selectCapability() {
    const res = await prompts([
        {
            type: 'select',
            name: 'selectCapability',
            message: `请选择需要处理的功能`,
            choices: [
                { title: '根据i18n.json路径批量替换react中文翻译代码', value: 'replace' },
                { title: '寻找并导出中文txt列表', value: 'find' },
            ],
        },
    ]);

    if (res.selectCapability === 'replace') {
        replaceInit2();
    } else if (res.selectCapability === 'find') {
        findInit();
    }
}

selectCapability();
